<?php
namespace app\api\controller;

use think\Controller;

class Demo extends Controller
{
    public function index() {
        var_dump(APP_PATH . 'jk_hb_ca/');die;
    }

    public function getlist(){
        $data = model("ImageListModel")->select();
        $applet_id = input("applet_id","0");
        $ret['code'] = 0;       
        $ret['data'] = $data;

        $appletinfo = model("WechatAppletModel")->find($applet_id);

        $ret['isshow'] = $appletinfo['isshow'];
        $ret['isshowback'] = $appletinfo['isshowback'];
        $ret['isjump'] = $appletinfo['isjump'];
        $ret['app_id'] = $appletinfo['app_id'];
        $ret['jump_url'] = $appletinfo['jump_url'];

        return json($ret);
    }

    public function getdetail(){
        $id = input("id/d");
        $data = model("ImageDetailModel")->where("pid",$id)->select();
        $ret['code'] = 0;
        $ret['data'] = $data;
        $ret['msg'] = 'success';
        return json($ret);
    }
}